package com.qf.test;

import com.qf.entity.Users;
import com.qf.service.UsersService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 2019/9/28
 * Administrator
 * springdata0928
 * 面向对象面向君  不负代码不负卿
 */
public class Demo2 {
    public static void main(String[] args) {
        ApplicationContext applicationContext=
                new ClassPathXmlApplicationContext("spring-data.xml");

        UsersService  service = (UsersService)applicationContext.getBean("usersServiceImpl");

        Users users = new Users();
        users.setUserId(1);
        users.setUsername("aaaa111");
        users.setPassword("bbbb22");

        Users users1 = service.insertUsers(users);

        System.out.println(users1);

    }
}
